//
//  TitleReusableView.m
//  BeanTrip
//
//  Created by dlios on 15-7-11.
//  Copyright (c) 2015年 PandaGroup. All rights reserved.
//

#import "TitleReusableView.h"
#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGH ([UIScreen mainScreen].bounds.size.height/667)


@implementation TitleReusableView
- (void)dealloc
{
    [_titleLabel release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel = [[UILabel alloc] init];
        [self addSubview:self.titleLabel];
        self.titleLabel.font = [UIFont fontWithName:@"Helvetica-BoldOblique" size:20*HEIGH];
        self.titleLabel.backgroundColor = [UIColor colorWithRed:231 / 255.0 green:211 / 255.0 blue:201 / 255.0 alpha:1];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [_titleLabel release];
    }
    return self;

}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(0, 0, 375*WIDTH, 30*HEIGH);

}

@end
